package com.gae.blore.client.dialog;

import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.Grid;
import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.PopupPanel;

public final class LoadingWidget extends PopupPanel

{

	private final FlowPanel container = new FlowPanel();

	public LoadingWidget()

	{
		final Image ajaxImage = new Image("images/loading.gif");
		final Grid grid = new Grid(1, 2);
		grid.setWidget(0, 0, ajaxImage);
		grid.setText(0, 1, "Loading...");
		this.container.add(grid);
		add(this.container);

	}

	public com.google.gwt.user.client.ui.Widget asWidget()

	{
		return this;
	}

	public void stopProcessing()

	{
		hide();
	}

	public void startProcessing()

	{
		show();

	}
}
